package cn.edu.scau.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 实体类Nurse的转换类NurseConve
 */
@NoArgsConstructor
@Data
@AllArgsConstructor
@Builder
public class NurseConve implements Serializable {
    private static final long serialVersionUID = -2633412637714484225L;
    /**
     * 护士id
     */
    private Integer nurseid;
    /**
     * 护士姓名
     */
    @NotBlank(message = "护士姓名不能为空")
    private String nursename;
    /**
     * 护士性别
     */
    @NotBlank(message = "护士性别不能为空")
    private String nursesex;
    /**
     * 护士年龄
     */
    @NotBlank(message = "护士年龄不能为空")
    @Pattern(regexp = "^[0-9]*[1-9][0-9]*$",message = "护士年龄为数字")
    private String nurseage;
    /**
     * 所拥有的用户id
     */
    @NotBlank(message = "用户id不能为空")
    @Pattern(regexp = "^[0-9]*[1-9][0-9]*$",message = "用户id为数字")
    private String userid;

}
